<!doctype html>
<html lang="en">

	<head>
		<meta charset="UTF-8">
		<title>天道</title>
		<meta name="renderer" content="webkit|ie-comp|ie-stand">
		<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
		<meta name="viewport" content="width=device-width,user-scalable=yes, minimum-scale=0.4, initial-scale=0.8,target-densitydpi=low-dpi" />
		<meta http-equiv="Cache-Control" content="no-siteapp" />
		<link rel="stylesheet" href="./css/frame/font.css">
		<link rel="stylesheet" href="./css/frame/xadmin.css">
		<link rel="stylesheet" href="./css/page/index.css">
		<script type="text/javascript" src="./lib/jquery/jquery-3.3.1.min.js"></script>
		<script type="text/javascript" src="./lib/layui/layui.js" charset="utf-8"></script>
		<script type="text/javascript" src="./js/frame/xadmin.js"></script>
		<script type="text/javascript" src="./js/constant/urls.js"></script>
	</head>

	<body>
		<!-- 顶部开始 -->
		<div class="container">
			<div class="logo">
				<a href="./index.html">微服务后台管理</a>
			</div>
			<div class="left_open">
				<i title="展开左侧栏" class="iconfont">&#xe603;</i>
			</div>
			<ul class="layui-nav right" lay-filter="">
				<li class="layui-nav-item" id="notice-li">
					<a href="javascript:;" id="notice"><i class="layui-icon layui-icon-notice" style="font-size: 20px;"></i></a>
					<dl class="layui-nav-child">
						<dd><a href="javascript:;"><span style="display: none;">111</span>修改信息矢量库党纪国法第六届公里数……</a></dd>
						<dd><a href="javascript:;"><span style="display: none;">222</span>安全管理大范甘迪环境房管局；开个会……</a></dd>
						<dd><a href="javascript:;"><span style="display: none;">333</span>退了放得开股份；科恒股份系红领巾返……</a></dd>
					</dl>
				</li>
				<li class="layui-nav-item">
					<a href="javascript:;" id="username"><img src='https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1590210978009&di=5a6a38a49b8fdfc0b3451dc018513ae3&imgtype=0&src=http%3A%2F%2Falcdn.img.xiaoka.tv%2F20161130%2Fbb6%2Fde2%2F85179246%2Fbb6de23b8439c0a2902f57ae4c0bf2e1.jpg%401e_1c_0o_0l_330h_330w' class='layui-nav-img'>admin</a>
					<dl class="layui-nav-child">
						<!-- 二级菜单 -->
						<dd>
							<a onclick="x_admin_show('个人信息','http://www.baidu.com')">个人信息</a>
						</dd>
						<dd>
							<a href="javascript:;" id="logout">退出</a>
						</dd>
					</dl>
				</li>
				<li class="layui-nav-item to-index">
					<a href="javascript:;">前台首页</a>
				</li>
			</ul>

		</div>
		<!-- 顶部结束 -->
		<!-- 中部开始 -->
		<!-- 左侧菜单开始 -->
		<div class="left-nav">
			<div id="side-nav">
				<ul id="nav">
					<li>
						<a href="javascript:;">
							<i class="iconfont">&#xe601;</i>
							<cite>工作流管理</cite>
							<i class="iconfont nav_right">&#xe604;</i>
						</a>
						<ul class="sub-menu">
							<li>
								<a _href="workflow-list.html">
									<i class="iconfont">&#xe605;</i>
									<cite>模型列表</cite>
								</a>
							</li>
							<li>
								<a _href="process-list.html">
									<i class="iconfont">&#xe605;</i>
									<cite>流程列表</cite>
								</a>
							</li>
							<li>
								<a _href="task-list.html">
									<i class="iconfont">&#xe605;</i>
									<cite>任务列表</cite>
								</a>
							</li>
						</ul>
					</li>
					<li>
						<a href="javascript:;">
							<i class="iconfont">&#xe6ad;</i>
							<cite>文件管理</cite>
							<i class="iconfont nav_right">&#xe604;</i>
						</a>
						<ul class="sub-menu">
							<li>
								<a _href="file-list.html">
									<i class="iconfont">&#xe605;</i>
									<cite>文件列表</cite>
								</a>
							</li>
						</ul>
					</li>
					<li>
						<a href="javascript:;">
							<i class="iconfont">&#xe602;</i>
							<cite>用户管理</cite>
							<i class="iconfont nav_right">&#xe604;</i>
						</a>
						<ul class="sub-menu">
							<li>
								<a _href="sysUser-list.html">
									<i class="iconfont">&#xe605;</i>
									<cite>系统用户</cite>
								</a>
							</li>
							<li>
								<a _href="thirdPartyUser-list.html">
									<i class="iconfont">&#xe605;</i>
									<cite>第三方用户</cite>
								</a>
							</li>
						</ul>
					</li>
					<li>
						<a href="javascript:;">
							<i class="iconfont">&#xe6d5;</i>
							<cite>系统设置</cite>
							<i class="iconfont nav_right">&#xe604;</i>
						</a>
						<ul class="sub-menu">
							<li>
								<a _href="system-properties.html">
									<i class="iconfont">&#xe605;</i>
									<cite>系统信息</cite>
								</a>
							</li>
							<li>
								<a _href="dict-list.html">
									<i class="iconfont">&#xe605;</i>
									<cite>字典管理</cite>
								</a>
							</li>
							<li>
								<a _href="permission-list.html">
									<i class="iconfont">&#xe605;</i>
									<cite>权限管理</cite>
								</a>
							</li>
							<li>
								<a _href="role-list.html">
									<i class="iconfont">&#xe605;</i>
									<cite>角色管理</cite>
								</a>
							</li>
						</ul>
					</li>
					<li>
						<a href="javascript:;">
							<i class="iconfont">&#xe606;</i>
							<cite>图标字体</cite>
							<i class="iconfont nav_right">&#xe604;</i>
						</a>
						<ul class="sub-menu">
							<li>
								<a _href="./fonts/unicode.html">
									<i class="iconfont">&#xe605;</i>
									<cite>图标对应字体</cite>
								</a>
							</li>
						</ul>
					</li>
				</ul>
			</div>
		</div>
		<!-- <div class="x-slide_left"></div> -->
		<!-- 左侧菜单结束 -->
		<!-- 右侧主体开始 -->
		<div class="page-content">
			<div class="layui-tab tab" lay-filter="xbs_tab" lay-allowclose="false">
				<ul class="layui-tab-title">
					<li class="home"><i class="layui-icon">&#xe68e;</i>数据看板</li>
				</ul>
				<div class="layui-tab-content">
					<div class="layui-tab-item layui-show">
						<iframe src='./welcome.html' frameborder="0" scrolling="yes" class="x-iframe"></iframe>
					</div>
				</div>
			</div>
		</div>
		<div class="page-content-bg"></div>
		<!-- 右侧主体结束 -->
		<!-- 中部结束 -->
		<!-- 底部开始 -->
		<div class="footer">
			<div class="copyright">Copyright ©2020 x-admin v2.3 All Rights Reserved</div>
		</div>
		<!-- 底部结束 -->
	</body>
	<script>
		$(function() {
			layui.use(['form'], function() {
				var form = layui.form,
					layer = layui.layer;
				let accessToken = sessionStorage.getItem("accessToken");
				console.log(accessToken);
				$.ajax({
					type: 'get',
					url: urls.authUrl + '/auth/user/curr',
					async: true,
					headers: {
						'Authorization': 'Bearer ' + accessToken
					},
					success: function(res) {
						if (res.success) {
							$('#username').html(
								"<img src='https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1590210978009&di=5a6a38a49b8fdfc0b3451dc018513ae3&imgtype=0&src=http%3A%2F%2Falcdn.img.xiaoka.tv%2F20161130%2Fbb6%2Fde2%2F85179246%2Fbb6de23b8439c0a2902f57ae4c0bf2e1.jpg%401e_1c_0o_0l_330h_330w' class='layui-nav-img'>" +
								res.data.account);
						} else {
							layer.msg("身份认证已过期，请重新登录", {
								icon: 5
							}, function() {
								window.location.href = "./login.html";
							});

						}
					}
				});
				// 退出登录操作
				$('#logout').click(function() {
					layer.confirm('确认退出登录？', function(index) {
						let accessToken = sessionStorage.getItem("accessToken");
						$.ajax({
							type: 'get',
							url: urls.authUrl + '/auth/user/logout',
							async: true,
							headers: {
								'Authorization': 'Bearer ' + accessToken
							},
							success: function(res) {
								window.location.href = "./login.html";
							}
						});
					});
				});
				// 查看通知消息
				$('#notice-li dd').click(function(){
					let id = $(this).children().children('span').html();
					layer.open({
						type: 2,
						content: './notice-details.html?id=' + id,
						area: ['800px', '500px'],
						btn: ['返回'],
						yes: function(index, layero) {
							//关闭当前frame
							layer.close(index);
						}
					});
				});
			});
		});
	</script>

</html>
